package com.wd.live.view.activity;

import android.content.Intent;
import android.media.MediaPlayer;

import com.wd.live.R;
import com.wd.live.base.BaseActivity;
import com.wd.live.base.BaseViewModel;
import com.wd.live.databinding.ActivityConstellationBinding;

public class ConstellationActivity extends BaseActivity<BaseViewModel, ActivityConstellationBinding> {


    @Override
    protected void initData() {
        String dizhi="android.resource://"+getPackageName()+"/"+R.raw.xingzuo;
        databind.videoPlayer.setVideoPath(dizhi);
        databind.videoPlayer.start();

        databind.videoPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
            @Override
            public void onCompletion(MediaPlayer mp) {
                startActivity(new Intent(ConstellationActivity.this,MatchingActivity.class));
                finish();
            }
        });
    }

    @Override
    protected int initLayout() {
        return R.layout.activity_constellation;
    }

    @Override
    public void onChanged(Object o) {

    }
}